public class b2Rot extends b2AllocationGuard {

	public b2Rot() {
		address = jni_b2Rot();
	}

	/** Initialize from an angle in radians */
	public b2Rot(float angle) {
		address = jni_b2Rot_angle(angle);
	}

	/**Set using an angle in radians.*/
	public void Set(float angle) {
		jni_b2Rot_Set(address, angle);
	}

	/**Set to the identity rotation*/
	public void SetIdentity() {
		jni_b2Rot_SetIdentity(address);
	}

	/**Get the angle in radians*/
	public float GetAngle() {
		float angle = jni_b2Rot_GetAngle(address);
		return angle;
	}

	/**Get the x-axis*/
	public b2Vec2 GetXAxis() {
		//TODO
		throw new OperationNotSupported();
		return null;
	}

	/**Get the y-axis*/
	public b2Vec2 GetYAxis() {
		//TODO
		throw new OperationNotSupported();
		return null;
	}

	@Override
	public void release() {
		jni_b2Rot_release(address);
		super.release();
	}

	private static native int jni_b2Rot();
	private static native int jni_b2Rot_angle(float angle);
	private static native void jni_b2Rot_release(int me);

	private static native void jni_b2Rot_Set(int me, float angle);
	private static native void jni_b2Rot_SetIdentity(int me);
	private static native float jni_b2Rot_GetAngle(int me);
}
